package com.pzhu.gmall.manage.controller;

import com.pzhu.gmall.bean.PmsSkuInfo;
import com.pzhu.gmall.service.SkuInfoService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.*;

/**
 * @author 刘鹏 liupeng
 * @date 2019/11/1
 **/
@RestController
@CrossOrigin
@RequestMapping("/sku")
public class SkuController {

    @Reference
    private SkuInfoService skuInfoService;

    @PostMapping
    public PmsSkuInfo saveSkuInfo(@RequestBody PmsSkuInfo pmsSkuInfo) {
        skuInfoService.save(pmsSkuInfo);
        return pmsSkuInfo;
    }
}
